
#pragma once

#include "../glm/dvec3.hpp"

CYBERTRON_BEGIN

// http://danceswithcode.net/engineeringnotes/geodetic_to_ecef/geodetic_to_ecef.html
class ECEF
{
public:
	//Convert Earth-Centered-Earth-Fixed (ECEF) to lat, Lon, Altitude
	//Input is a three element array containing x, y, z in meters
	//Returned array contains lat and lon in radians, and altitude in meters
	CybertronCoreAPI static dvec3 toGeodetic(const dvec3& ecef);

	//Convert Lat, Lon, Altitude to Earth-Centered-Earth-Fixed (ECEF)
	//Input is a three element array containing lat, lon (rads) and alt (m)
	//Returned array contains x, y, z in meters
	CybertronCoreAPI static dvec3 fromGeodetic(const dvec3& geo);
};

CYBERTRON_END
